<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Admin_model extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}

	function SelectUserLogin($username, $password)
	{
            $userlogin = $this->db->query("CALL uspSelUserLogin('".$username."','".$password."')")->result_array();
            return $userlogin;
	}

    function UpdateUserLogin($log, $userid)
    {
		$this->db->query("CALL uspUpdUserLogin(".$log.",".$userid.")")->result_array();
    }

	function SelectProvince($provinceId)
	{
		return $this->db->query("CALL uspSelProvince(".$provinceId.")")->result_array();
	}

	function SelectRegency($provinceId, $regencyId)
	{
		return $this->db->query("CALL uspSelRegency(".$provinceId.",".$regencyId.")")->result_array();
	}

    function SelectUserRuleByUserId($userid)
    {

    }

        
}

/* End of file Admin_model.php */
/* Location: ./application/models/Admin_model.php */
